import java.util.Scanner;

public class L23 {
    public static void main(String[] args) {
        double ys = 8.8;
        double mj = 10.0;
        double sb = 18.8;
        double pg = 12.5;
        double xj = 15.5;
        int i =0;
        String a = "Y";
        System.out.println("-------------黑马小商城-------------");
        System.out.println("1.牙刷的价格为："+ys+"元");
        System.out.println("2.毛巾的价格为："+mj+"元");
        System.out.println("3.水杯的价格为："+sb+"元");
        System.out.println("4.苹果的价格为："+pg+"元");
        System.out.println("5.香蕉的价格为："+xj+"元");
        while (a.equals("Y")){
            Scanner scl = new Scanner(System.in);
            System.out.println("请输入你需要购买的商品序列号");
            i= scl.nextInt();
            switch (i){
                case 1:
                    System.out.println("请输入你要购买的牙刷数量");
                    int yssl = scl.nextInt();
                    double yszj = yssl*ys;
                    System.out.println("你购买了"+yssl+"个牙刷，需要支付"+yszj+"元");
                    System.out.println("需要继续购买请输入输入Y，否则输入N");
                    a = scl.next();
                    break;
                case 2:
                    System.out.println("请输入你要购买的毛巾数量");
                    int mjsl = scl.nextInt();
                    double mjzj = mjsl*mj;
                    System.out.println("你购买了"+mjsl+"个maoj，需要支付"+mjzj+"元");
                    System.out.println("需要继续购买请输入输入Y，否则输入N");
                    a = scl.next();
                    break;
                case 3:
                    System.out.println("请输入你要购买的水杯数量");
                    int sbsl = scl.nextInt();
                    double sbzj = sbsl*sb;
                    System.out.println("你购买了"+sbsl+"个水杯，需要支付"+sbzj+"元");
                    System.out.println("需要继续购买请输入输入Y，否则输入N");
                    a = scl.next();
                    break;
                case 4:
                    System.out.println("请输入你要购买的苹果数量");
                    int pgsl = scl.nextInt();
                    double pgzj = pgsl*pg;
                    System.out.println("你购买了"+pgsl+"个苹果，需要支付"+pgzj+"元");
                    System.out.println("需要继续购买请输入输入Y，否则输入N");
                    a = scl.next();
                    break;
                case 5:
                    System.out.println("请输入你要购买的香蕉数量");
                    int xjsl = scl.nextInt();
                    double xjzj = xjsl*xj;
                    System.out.println("你购买了"+xjsl+"个香蕉，需要支付"+xjzj+"元");
                    System.out.println("需要继续购买请输入输入Y，否则输入N");
                    a = scl.next();
                    break;
            }
        }
        System.out.println("感谢您的光临，期待下次再来");
    }
}
